﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Globalization;
using System.Web.UI.WebControls;

namespace Reconciliation.Web.Users_Control
  
 
{     
   

    public partial class HeadMenu : System.Web.UI.UserControl
    {
        private int _menuID = 0;
       // private static DateTime _Time =   ConsensioConst.CurrentDate;
        public int MenuID
        {
            get
            {
                return _menuID;
            }
            set
            {
                _menuID = value;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            InitDate();
            InitMenu();

        }
        private void InitDate()
        {
          // string Today =   ConsensioConst.CurrentDate.ToString("dd/MM/yy ddd HH:mm:ss", System.Globalization.DateTimeFormatInfo.InvariantInfo);

           // string UpdateDate = new DateTime(2007, 4, 3, 10, 10, 10).ToString("dd/MM/yy ddd HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo);

          //  string Today1 = Common.FormatDate(_Time);
           // string Today2 = Common.FormatTime(_Time);
           
           // day1.Text = Today1;
          
          //  time1.Text = Today2;

          //  string[] todays = Today.Split(new char[] { ' ' });
         
          //  weekday1.Text = todays[1];
            
           // string Today=DateTime.Today.ToString();
  
            day1.Text = BasePage.FormatDate(DateTime.Today);//,CultureInfo.InvariantCulture);
            weekday1.Text =DateTime.Today.DayOfWeek.ToString().Remove(3);
            //time1.Text = DateTime.Today.TimeOfDay.ToString();
            Update_Date.Text = BasePage.FormatDate(DateTime.Today);
            Update_Time.Text = BasePage.FormatTime(DateTime.Now);//ToShortTimeString();

        }
       private void  InitMenu()
        {
            if (MenuID == 0)
            { aStatus.Attributes.Add("class", "on"); }
            //if (MenuID == 1)
            //{ aCase.Attributes.Add("class", "on"); }
           if(MenuID==1)
           { aInvoice.Attributes.Add("class","on");}
        }

    }

}